package com.qingmi.farmer.viewmodel;

import android.databinding.ObservableField;

import com.qingmi.farmer.data.model.GoodsInfo;
import com.wjjun.basemvpvm.viewmodel.BaseViewModel;

/**
 * 首页的热卖
 * Created by 67535 on 2018/5/1.
 */
public class HotSellViewModel extends BaseViewModel {

    public String goods1Id;

    public final ObservableField<String> goods1Name = new ObservableField<>();

    public final ObservableField<String> goods1Desc = new ObservableField<>();

    public final ObservableField<String> goods1Img = new ObservableField<>();


    public String goods2Id;

    public final ObservableField<String> goods2Name = new ObservableField<>();

    public final ObservableField<String> goods2Desc = new ObservableField<>();

    public final ObservableField<String> goods2Img = new ObservableField<>();


    public String goods3Id;

    public final ObservableField<String> goods3Name = new ObservableField<>();

    public final ObservableField<String> goods3Desc = new ObservableField<>();

    public final ObservableField<String> goods3Img = new ObservableField<>();


    public void setGoods1(GoodsInfo goods) {
        goods1Id = goods.getGoodId();
        goods1Name.set(goods.getName());
        goods1Desc.set(goods.getRecommendSummary());
        goods1Img.set(goods.getPic());
    }

    public void setGoods2(GoodsInfo goods) {
        goods2Id = goods.getGoodId();
        goods2Name.set(goods.getName());
        goods2Desc.set(goods.getRecommendSummary());
        goods2Img.set(goods.getPic());
    }

    public void setGoods3(GoodsInfo goods) {
        goods3Id = goods.getGoodId();
        goods3Name.set(goods.getName());
        goods3Desc.set(goods.getRecommendSummary());
        goods3Img.set(goods.getPic());
    }
}
